﻿@{
    NoteAndContent[] noteAndContents = ViewBag.noteAndContent;
    User blogUser = ViewBag.blogUser;
    Repository repository= ViewBag.repository;
}
@if (noteAndContents != null && noteAndContents.Length > 0)
{
    @foreach (NoteAndContent item in noteAndContents)
    {
        <div class="each-post">
            <div class="title">

                <a href="/Blog/@repository.Id.ToHex()/Post/@item.note.Id.ToHex()" title="@(item.note.Title)">
                    @(item.note.Title)
                </a>
            </div>

            <div class="created-time">
                <!--tag标签开始-->
                @if (item.note.Tags != null && item.note.Tags.Length > 0)
                {

                    @foreach (var tag in item.note.Tags)
                    {
                        <i class="fa fa-bookmark-o" style="color:#DA3E3E"></i>
                        @*@(tag)@Html.Raw("&nbsp;&nbsp;");*@
                        <a href="/Blog/@repository.Id.ToHex()/Tags_Posts/@tag">@tag</a>

                        @Html.Raw("&nbsp;&nbsp;")
                    }
                }
                <!--tag标签结束-->
                发布于 <span id="postmark">@item.note.PublicTime.ToString("yyyy年MM月dd日 HH:mm:ss")</span>
                <!--博客统计-->
                &nbsp;&nbsp;@(item.note.ReadNum)次围观&nbsp;&nbsp;&nbsp;@(item.note.CommentNum)条评论

            </div>
            <div class="desc">
                @Html.Raw(item.noteContent.Abstract)
            </div>
            <span id="moreContainer" class="button raised bg-blue-300" style="margin-top:8px;">
                <a id="readmore" style="color:#fff;letter-spacing:1px;" href="~/blog/post/@blogUser.Username/@item.note.Id.ToHex()">查看更多</a>
            </span>
        </div>
    }
}else
	{ 
    <div class="each-post">
        无
    </div>
	}

